<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="https://csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js"></script>
  <script src="http://www.jq22.com/js/jquery.qrcode.min.js"></script>
  <script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
  <script src="http://www.jq22.com/demo/dayin/jquery.jqprint-0.3.js"></script>
</head>

<body>
    <div class="qrcBody" id="qrcBody">
      </div>
  <div class="qrcBody" id="qrcBodyImg" style="display:none">
    <img class="qrcImg" src="">
    <img class="align-center-middle upLogo" src="">
  </div>
  <button id="btnPrint" type="button" class="btn btn-primary pull-right" style="margin-left :30px">Print QRC
  </button>
</body>
<script>

  jQuery('#qrcBody').qrcode({
       width: 250,
       height: 250,
       text: "good good study, day day up! "//二维码的内容
   })
  var qrcSrc = $("canvas")[0].toDataURL();//二维码canvas转img
  var upLogSrc = "img/kaoshen.jpg";//二维码中间的logo
    $("#qrcBodyImg .qrcImg").attr("src", qrcSrc);
    $("#qrcBodyImg .upLogo").attr("src", upLogSrc);
    $("#qrcBody").hide();//隐藏canvas部分
    $("#qrcBodyImg").show();//显示img部分


  //打印部分
  $("#btnPrint").click(function () {
    $("#qrcBodyImg").jqprint({

    })
  })
</script>
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
<script>
  L2Dwidget.init({
      "model": {
          jsonPath: "https://unpkg.com/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json",
          "scale": 1
      },
      "display": {
          "position": "right",
          "width": 150,
          "height": 300,
          "hOffset": 0,
          "vOffset": -20
      },
      "mobile": {
          "show": true,
          "scale": 0.5
      },
      "react": {
          "opacityDefault": 0.7,
          "opacityOnHover": 0.2
      }
  });
</script>

<script>
  function curry(fn, args = []) {
    return function(){
        let rest = [...args, ...arguments];
        if (rest.length < fn.length) {
            return curry(fn,rest);
        }else{
            return fn.apply(this,rest);
        }
    }
}
//test
function sum(a,b,c) {
    return a+b+c;
}
let sumFn = curry(sum);
console.log('aaa',sumFn(1))
// console.log(sumFn(1)(2)(3)); //6
// console.log(sumFn(1)(2, 3)); //6


var arr = [1,3,4,2,9,5,6,7,8]


var m = 0

for(let i=0,len=arr.length;i<len-1;i++){

  for(let j = 0,_len = arr.length;j<_len-1;j++){
    m++

    if(arr[j]>arr[j+1]){
      var temp = arr[j];
      arr[j] = arr[j+1];
      arr[j+1] = temp
    }
  console.log(arr,m)

  }
}


var _arr = [2, 10, 3, 4, 5, 11, 10, 11, 20];

function fn (arr){
  arr[0] = 3
  console.log(arr)
}
fn(_arr)
console.log(_arr)


</script>
</html>